package models

type Permissions struct {
	ID
	Pid        uint   `json:"pid" gorm:"size:30;not null;comment:父id"`
	Name       string `json:"name" gorm:"size:128;not null;comment:角色名称"`
	Guard_name string `json:"guard_name" gorm:"size:128;not null;comment:用户名称"`
	Url        string `json:"url" gorm:"size:128;not null;comment:url"`
	Group      string `json:"group" gorm:"size:128;not null;comment:group名称"`
	Title      string `json:"title" gorm:"size:128;not null;comment:title名称"`
	Icon       string `json:"icon" gorm:"size:128;not null;comment:图标名称"`
	Target     string `json:"target" gorm:"size:128;not null;comment:target名称"`
	Sort       uint   `json:"sort" gorm:"size:12; null;comment:排序字段"`
	Menu_type  uint   `json:"menu_type" gorm:"size:12; null;comment:菜单类型"`
	Level      uint   `json:"level" gorm:"size:12; null;comment:菜单层级"`
	Timestamps
}

type Node struct {
	ID
	Pid       uint   `json:"pid" gorm:"size:30;not null;comment:父id"`
	Name      string `json:"name" gorm:"size:128;not null;comment:角色名称"`
	Title     string `json:"title" gorm:"size:128;not null;comment:title名称"`
	Sort      uint   `json:"sort" gorm:"size:12; null;comment:排序字段"`
	Menu_type uint   `json:"menu_type" gorm:"size:12; null;comment:菜单类型"`
	Level     uint   `json:"level" gorm:"size:12; null;comment:菜单层级"`
	Children  []Node `json:"children"`
}

type Button struct {
	ID
}
